{template "content","header"}
<div class="main">
<script type="text/javascript">
 

 $(function () {
     function Load(div,url) {
     	
     	
     	
	
		if (window.ActiveXObject||"ActiveXObject" in window) 
		{
			
			
				document.getElementById(div).innerHTML = "<object classid=\"clsid:7017318C-BC50-4DAF-9E4A-10AC8364C315\" codebase=\"iStylePDF.cab#version=2,0,5,1103\" id=iStylePDF height=100%  width=100%></object>";
		} 
		else 
		{
			var plugin = window.navigator.plugins["npistylepdf plugin dll"];
			
			if(plugin==undefined){
			
				document.getElementById(div).innerHTML = "<a href='http://www.istylepdf.com/istylepdfupdate/x86/istylepdf-r2.0.5.1103-windows-x86.exe' class='install'>您尚未安装iStylePDF控件，点这里进行安装...</a>";
				return;
			}else{
			
				document.getElementById(div).innerHTML = "<embed id=iStylePDF type=application/npistyleax width=100% height=100%/>";
			}
		}
		iStylePDF.Options.HighlightField = false;
		iStylePDF.Options.HistoryEnabled = false;
		iStylePDF.Options.DocumentsLayout = 0;
		iStylePDF.CommandBars.Item("MenuBar").Visible = false;

	iStylePDF.CommandBars.Item(1).enable = false;//文件工具栏
iStylePDF.CommandBars.Item(1).Lock
	
	iStylePDF.Documents.OpenFromURL(url);

	}   
   $(window).load(function() {
   	
   		{loop $newsfile $k $r}
	//alert({$k});
	  if({$k}==0){
	  	
	  		  var url="{php echo preg_replace( "/<a href='(.*)'(.*)<\/a>/iUs", '\\1',$r)}";
	//  $("#plugin").append("<div id='p{$k}'>{$k}"+url+"</div>");

	  Load('pdfview',url);
	  }

	{/loop}
   	

   	
          //Load();
  });         

          
        });
     $(function(){
     	
     	
     	      		{loop $newsfile $k $r}
	//alert({$k});
	
	  var url="{php echo preg_replace( "/<a href='(.*)'(.*)<\/a>/iUs", '\\1',$r)}";
	   var name="{php echo strip_tags(preg_replace( "/<a href='(.*)'(.*)<\/a>/iUs", '\\0',$r))}";
$("#toolview").append("<a href=\"#\" class=\"easyui-linkbutton l-btn l-btn-plain\" data-options=\"plain:true,iconCls:'icon-reload'\">"+name+"</a>");



	{/loop}
     	
     })
        
        
     
</script>
	<div  class="col-left" style="width:100%">
    	<div class="crumbs"><a href="{siteurl($siteid)}">首页</a><span> &gt; </span>{catpos($catid)} 正文</div>
        <div id="Article">
        	<h1>{$title}<br />
<span>发布日期:{$inputtime}&nbsp;&nbsp;&nbsp;作者：{$username}&nbsp;&nbsp;&nbsp;
 点击：</span><span id="hits"></span></h1>
			{if $description}<div class="summary" >{$description}</div>
			{/if}
			<div class="content">
			{if $allow_visitor==1}
		
<div id="toolview" style="padding:5px;border:1px solid #ddd;">
	    点击按钮选择要查看的报纸文件：
	</div>
<div id="pdfview" class="easyui-panel" style="width:1170px;height:600px"
		title="">
</div>





				<!--内容关联投票-->
				{if $voteid}<script language="javascript" src="{APP_PATH}index.php?m=vote&c=index&a=show&action=js&subjectid={$voteid}&type=2"></script>{/if}
                
			{else}
				<CENTER><a href="{APP_PATH}index.php?m=content&c=readpoint&allow_visitor={$allow_visitor}"><font color="red">阅读此信息需要您支付 <B><I>{$readpoint} {if $paytype}元{else}点{/if}</I></B>，点击这里支付</font></a></CENTER>
			{/if}
			</div>
{if $titles}
<fieldset>
	<legend class="f14">本文导航</legend><ul class="list blue row-2">
{loop $titles $r}
	<li>{$n}、<a href="{$r[url]}">{$r[title]}</a></li>
{/loop}
</ul>
</fieldset>
{/if}
			<div id="pages" class="text-c">{$pages}</div>
            <p style="margin-bottom:10px">
            <strong>相关热词搜索：</strong>{loop $keywords $keyword}<a href="{APP_PATH}index.php?m=content&c=tag&a=lists&tag={urlencode($keyword)}" class="blue">{$keyword}</a> 	{/loop}
            </p>
            <p class="f14">
                <strong>上一篇：</strong><a href="{$previous_page[url]}">{$previous_page[title]}</a><br />
                <strong>下一篇：</strong><a href="{$next_page[url]}">{$next_page[title]}</a>
            </p>
          {pc:content action="relation" relation="$relation" id="$id" catid="$catid" num="5" keywords="$rs[keywords]"}
              {if $data}
                <div class="related">
                    <h5 class="blue">延伸阅读：</h5>
                    <ul class="list blue lh24 f14">
                        {loop $data $r}
                            <li>·<a href="{$r[url]}" target="_blank">{$r[title]}</a><span>({date('Y-m-d',$r[inputtime])})</span></li>
                        {/loop}
                    </ul>
                </div>
              {/if}
          {/pc}
          <div class="bk15"></div>
            {if module_exists('mood')}<script type="text/javascript" src="{APP_PATH}index.php?m=mood&c=index&a=init&id={id_encode($catid,$id,$siteid)}"></script>{/if}
      </div>
      <div class="Article-Tool">
         
      
	  <span id='favorite'>
		<a href="javascript:;" onclick="add_favorite('{addslashes($title)}');" class="t6">收藏到您的会员中心</a>
	  </span>

	  </div>
      <div class="bk10"></div>
      {if $allow_comment && module_exists('comment')}
      <iframe src="{APP_PATH}index.php?m=comment&c=index&a=init&commentid={id_encode("content_$catid",$id,$siteid)}&iframe=1" width="100%" height="100%" id="comment_iframe" frameborder="0" scrolling="no"></iframe>
      <div class="box">
        		<h5>评论排行</h5>
				 {pc:comment action="bang" siteid="$siteid" cache="3600"}
            	<ul class="content list blue f14 row-2">
				{loop $data $r}
                	<li>·<a href="{$r[url]}" target="_blank">{str_cut($r[title], 40)}</a><span>({$r[total]})</span></li>
					{/loop}
                </ul>
				{/pc}
        </div>
        {/if}
  </div>

</div>
<script type="text/javascript">
<!--
	function show_ajax(obj) {
		var keywords = $(obj).text();
		var offset = $(obj).offset();
		var jsonitem = '';
		$.getJSON("{APP_PATH}index.php?m=content&c=index&a=json_list&type=keyword&modelid={$modelid}&id={$id}&keywords="+encodeURIComponent(keywords),
				function(data){
				var j = 1;
				var string = "<div class='point key-float'><div style='position:relative'><div class='arro'></div>";
				string += "<a href='JavaScript:;' onclick='$(this).parent().parent().remove();' hidefocus='true' class='close'><span>关闭</span></a><div class='contents f12'>";
				if(data!=0) {
				  $.each(data, function(i,item){
					j = i+1;
					jsonitem += "<a href='"+item.url+"' target='_blank'>"+j+"、"+item.title+"</a><BR>";
					
				  });
					string += jsonitem;
				} else {
					string += '没有找到相关的信息！';
				}
					string += "</div><span class='o1'></span><span class='o2'></span><span class='o3'></span><span class='o4'></span></div></div>";		
					$(obj).after(string);
					$('.key-float').mouseover(
						function (){
							$(this).siblings().css({"z-index":0})
							$(this).css({"z-index":1001});
						}
					)
					$(obj).next().css({ "left": +offset.left-100, "top": +offset.top+$(obj).height()+12});
				});
	}

	function add_favorite(title) {
		$.getJSON('{APP_PATH}api.php?op=add_favorite&title='+encodeURIComponent(title)+'&url='+encodeURIComponent(location.href)+'&'+Math.random()+'&callback=?', function(data){
			if(data.status==1)	{
				$("#favorite").html('收藏成功');
			} else {
				alert('请登录');
			}
		});
	}

$(function(){
  $('#Article .content img').LoadImage(true, 660, 660,'{IMG_PATH}s_nopic.gif');    
})
//-->
</script>

<script language="JavaScript" src="{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"></script>
{template "content","footer"}